#pragma once

template<typename T>
class Singleton
{
public:
	static T& GetSingleton()
	{
		if (!singleton) singleton = new T();
			return *singleton;
	}
	static T* GetSingletonPtr()
	{
		if (!singleton) singleton = new T();
			return singleton;
	}
private:
	static T* singleton;
};

template<typename T> T* Singleton<T>::singleton = 0;

